package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingLevel;
import com.zzyl.entity.NursingPlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface NursingLevelMapper {
    /**
     * 查询所有护理等级
     */
    List<NursingLevel> findNursingLevelList();

    /**
     * 新增护理等级
     */
    void insertNursingLevel(NursingLevel nursingLevel);

    /**
     * 分页查询
     */
    Page<NursingLevel> queryNursingLevel(@Param("name") String name,@Param("status") Integer status);

    /**
     * 根据护理等级的ids查询被引用的次数
     */
    List<Map<String , Object>> queryNursingLevelByids(List<Long> ids);

    /**
     * 根据id查询
     */
    NursingLevel findNursingLevelById(@Param("id") Integer id);

    /**
     * 修改护理等级
     */
    void modifyNursingLevel(NursingLevel nursingLevel);

    /**
     * 删除护理等级
     */
    void deleteNursingLevel(@Param("id") Integer id);

    /**
     * 启用/禁用
     */
    void modifyNursingLevelStatus(@Param("id") Integer id,@Param("status") Integer status);
}
